package com.ssy.lingxi.product.model.request;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author hsl
 * @version 2.0.0
 * @date 22/03/22 16:59
 */
@Data
public class MaterialGroupRequest {
    /**
     * id
     */
    private Long id;

    /**
     * 父级id
     */
    @NotNull(message = "父级id不能为空")
    private Long parentId;

    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空")
    @Size(max = 40, message ="物料组名称最长为40个字符" )
    private String name;

    /**
     * 代码
     */
    @NotBlank(message = "代码不能为空")
    @Size(max = 12, message ="物料组代码最长为12个字符" )
    private String code;

    /**
     * 描述
     */
    @Size(max = 64, message ="物料组描述最长为64个字符" )
    private String description;
}
